package com.example.firstapp.KtLesson

fun main() {
    // for
    // 小于等于10
    for(i in 0..10 step 2){
        print(i.toString()+"-")
    }
    // 小于10
    println()
    for (i in 0 until 10 step 2){
        print(i.toString()+"-")
    }
    println()
    val a = listOf("a","b","b")
    for(i in a ){
        println(i)
    }

    // while
    var b = 1
    while (b < 10){
        println(b)
        b += 1
    }
    do {
        println(b)
        b -= 1
    } while (b>5)

}